/* mcu porting file for msp430g3507 */

#ifndef PORTING_MSPM0G3507_H
#define PORTING_MSPM0G3507_H

#include "..\ti_msp_dl_config.h"
#include "rtthread.h"
#include "userlib.h"

typedef struct
{
    struct
    {
        const uint8_t headFrame_0;
        const uint8_t headFrame_1;
        float roll;
        float pitch;
        float yaw;
        int16_t version;
    }angle;
}JY901S_t;
// <<< Use Configuration Wizard in Context Menu >>>

// <c1>PIN
//  <i>use pin
#define USE_PIN
// </c>

// <c1>PWM
//  <i>use pwm
#define USE_PWM
// </c>

// <c1>TIMER
//  <i>use timer
//#define USE_TIMER
// </c>

// <c1>UART
//  <i>use uart
//#define USE_UART
// </c>

// <c1>IIC
//  <i>use iic
//#define USE_IIC
// </c>

// <c1>SPI
//  <i>use spi
//#define USE_SPI
// </c>

// <c1>CAN
//  <i>use can
//#define USE_CAN
// </c>

// <c1>ADC
//  <i>use adc
#define USE_ADC
// </c>

// <<< end of configuration section >>>

#define os_delay_ms(ms)                            rt_thread_mdelay(ms)

#ifdef  USE_PIN
#define pin_set(port,pin)                          DL_GPIO_setPins(port,pin)
#define pin_clear(port,pin)                        DL_GPIO_clearPins(port,pin)
#define pin_toggle(port,pin)                       DL_GPIO_togglePins(port,pin)
#define pin_read(port,pin)                         DL_GPIO_readPins(port,pin)
#endif /* USE_PIN */

#ifdef  USE_PWM
#define pwm_set_ccr(timerx,chx,ccr)                DL_TimerG_setCaptureCompareValue(timerx,ccr,chx)
#endif /* USE_PWM */

#ifdef  USE_TIMER

#endif /* USE_TIMER */

#ifdef  USE_UART

#endif /* USE_UART */

#ifdef  USE_IIC

#endif /* USE_IIC */

#ifdef  USE_SPI

#endif /* USE_SPI */

#ifdef  USE_CAN

#endif /* USE_CAN */

#ifdef  USE_ADC

#endif /* USE_ADC */

#endif
